package com.esri.core.ags;

import java.io.IOException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class SyncCapabilities {
    private boolean a;
    private boolean b;
    private boolean c;
    private boolean d;
    private boolean e;
    private boolean f;

    public boolean isAsyncSupported() {
        return this.a;
    }

    public boolean isRegisteringExistingDataSupported() {
        return this.b;
    }

    public boolean isSyncDirectionControlSupported() {
        return this.c;
    }

    public boolean isPerLayerSyncSupported() {
        return this.d;
    }

    public boolean isPerGeodatabaseSyncSupported() {
        return this.e;
    }

    public boolean isRollbackOnFailureSupported() {
        return this.f;
    }

    public static SyncCapabilities fromJson(JsonParser jsonParser) throws JsonParseException, IOException {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        SyncCapabilities syncCapabilities = new SyncCapabilities();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("supportsAsync".equals(currentName)) {
                syncCapabilities.a = jsonParser.getBooleanValue();
            } else if ("supportsRegisteringExistingData".equals(currentName)) {
                syncCapabilities.b = jsonParser.getBooleanValue();
            } else if ("supportsSyncDirectionControl".equals(currentName)) {
                syncCapabilities.c = jsonParser.getBooleanValue();
            } else if ("supportsPerLayerSync".equals(currentName)) {
                syncCapabilities.d = jsonParser.getBooleanValue();
            } else if ("supportsPerReplicaSync".equals(currentName)) {
                syncCapabilities.e = jsonParser.getBooleanValue();
            } else if ("supportsRollbackOnFailure".equals(currentName)) {
                syncCapabilities.f = jsonParser.getBooleanValue();
            } else {
                jsonParser.skipChildren();
            }
        }
        return syncCapabilities;
    }
}
